Add leaves for common org-defined TLVs to LLDP neighbor state#1478
Add leaves for common org-defined TLVs to LLDP neighbor state#1478yogeshg-arista wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the LLDP model to version 1.1.0, introducing new neighbor state leaves for LLDP-MED inventory serial numbers, IEEE 802.1 port VLAN IDs, and IEEE 802.3 link aggregation and maximum frame size. The review feedback highlights that the port-vlan-id should be adjusted to allow a value of 0 for non-VLAN-aware ports and suggests replacing the uint8 bitfield for link aggregation with explicit boolean leaves to follow OpenConfig conventions for telemetry usability.
…nto booleans
- Replace oc-vlan-types:vlan-id with uint16 range 0..4094 to allow
PVID value 0 (port not VLAN-aware per IEEE 802.1Q)
- Remove unused openconfig-vlan-types import
- Replace link-aggregation-status uint8 bitfield with two explicit
boolean leaves: link-aggregation-capable and link-aggregation-enabled
|
/gcbrun |
|
No major YANG version changes in commit 69ac85c |
|
Re: I would suggest putting the three link-aggregation fields into a link-aggregation container, and then naming the fields capable, enabled, port-id. |
|
Reviewed at the OC Community Meeting May 7th, 2026: Could we get another vendor to review / comment if they already implement this behavior? |
|
/gcbrun |
1. Group link-aggregation-capable, link-aggregation-enabled, and link-aggregation-port-id into a link-aggregation container with shortened leaf names (capable, enabled, port-id) - Fix trailing whitespace and reference indentation in revision block
I have created the container link-aggregation with leaves capable, enabled and port-id. |
Hi, @rgwilton does Cisco implement support for this data? Can you provide a link for the benefit of this PR? |
|
/gcbrun |
|
Hello @rgwilton , bumping it up. @yogeshg-arista can you please help getting the reference implementations from other vendors, we will be able to merge this PR in once we have that. |
|
@dplore, I think that we support some of these TLVs (e.g., IEEE 802.1 Port VLAN ID TLV), but not the other TLVs that are being proposed, as least in IOS XR. |
earies
left a comment
There was a problem hiding this comment.
Suggest adding reference statements to each leaf proposed here to clarify which governing specs (IEEE/ANSI), OUIs + sections each correspond to
| } | ||
|
|
||
| leaf port-vlan-id { | ||
| type uint16 { |
There was a problem hiding this comment.
I'd say we're at the point where there should be a proper reusable typedef for this - the closest current one sits in openconfig-vlan-types but restricts to 1..4094 - maybe something directly in openconfig-types or adjustment within that model is warranted
There was a problem hiding this comment.
Thanks for the suggestion @earies. We see two options here:
Option 1: New typedef (e.g. vlan-id-or-none) in openconfig-vlan-types
A new typedef with range 0..4094 that explicitly documents the semantics of 0 (the system either does not know the PVID or does not support Port-based VLAN operation). This keeps the existing vlan-id (range 1..4094) untouched, so no risk to current consumers. The downside is introducing a second VLAN ID typedef that is very similar to the existing one.
Option 2: Widen existing vlan-id typedef from 1..4094 to 0..4094
One typedef covers both cases. But this changes the contract for all existing users of vlan-id across OpenConfig models. Config leaves that use this typedef would suddenly accept 0, which may not be meaningful in those contexts, and implementations might mishandle the value 0.
Given the risks of Option 2, we lean toward Option 1 but would appreciate the community's input. Also open to keeping the inline uint16 { range "0..4094"; } as-is if a new typedef isn't warranted for a single use.
@dplore @earies @rgwilton and the community, please let us know your thoughts on this.
From JUNOS/EVO perspective, these are all supportable |
1. Add references for common org-defined TLVs in LLDP neighbor state 2. Do not create a new container for link-aggregation in LLDP neighbor state
I have added references for all the new leaves. |
As per the discussion in the community meeting dated June 4, 2026, it was discussed that a new container here is against the common OC state pattern. Reverting back to the original change with separate leaves link-aggregation-capable, link-aggregation-enabled and link-aggregation-port-id directly in the neighbor state container. |
I assume this is just in relation to nesting another container as a child of |
Resolves Issue #1471
Change Scope
Add the following new read-only leaves under
/lldp/interfaces/interface/neighbors/neighbor/statefor widely implemented, standards-based LLDP TLVs:med-inventory-serial-number(string) — LLDP-MED Inventory Serial Number TLV (OUI 00-12-BB, subtype 8)port-vlan-id(uint16 { range 0..4094 }) — IEEE 802.1 Port VLAN ID TLV (OUI 00-80-C2, subtype 1)link-aggregation(container) — IEEE 802.3 Link Aggregation TLV (OUI 00-12-0F, subtype 3), containing:capable(boolean)enabled(boolean)port-id(uint32)max-frame-size(uint16) — IEEE 802.3 Maximum Frame Size (OUI 00-12-0F, subtype 4)These TLVs are defined in IEEE 802.1, IEEE 802.3, and ANSI/TIA-1057 and are broadly supported across network platforms. They are essential for network automation use cases including inventory management.
This change is backward compatible (minor version bump 1.1.0 → 1.2.0).
Platform Implementations
Arista: These TLVs are supported in EOS CLI via
show lldp neighbors detail. See LLDP EOS User Manual and sample CLI output below.Tree View
module: openconfig-lldp path: /lldp/interfaces/interface/neighbors/neighbor/state +--ro state +--ro system-name? string +--ro system-description? string +--ro chassis-id? string +--ro chassis-id-type? oc-lldp-types:chassis-id-type +--ro management-interface? oc-if:interface-id +--ro id? string +--ro age? uint64 +--ro last-update? int64 +--ro ttl? uint16 +--ro port-id? string +--ro port-id-type? oc-lldp-types:port-id-type +--ro port-description? string x--ro management-address? string x--ro management-address-type? string + +--ro med-inventory-serial-number? string + +--ro port-vlan-id? uint16 + +--ro link-aggregation-capable? boolean + +--ro link-aggregation-enabled? boolean + +--ro link-aggregation-port-id? uint32 + +--ro max-frame-size? uint16